package com.glwan.fixedassetapp.helper;

import android.app.Activity;

public interface RFIDDeviceInterface {

    /**
     * Zebra
     */
    public static final String ZEBRA = "Zebra";

    /**
     * 汉德霍尔
     */
    public static final String ALPS = "alps";

    /**
     * 优博讯
     */
    public static final String UROVO = "Urovo";

    /**
     * 东大集成
     */
    public static final String SEUIC = "Seuic";

    public static final String CHAINWAY = "CHAINWAY";

    /**
     * 获取rfid
     *
     * @param brand    品牌
     * @param activity activity
     * @return RFIDDeviceInterface
     */
    static RFIDDeviceInterface getInstance(String brand, Activity activity) {
        RFIDDeviceInterface rfidDeviceInterface;
        switch (brand) {
            case ZEBRA:
                rfidDeviceInterface = ZebraReaderHelper.getInstance(activity);
                break;
            case ALPS:
                rfidDeviceInterface = AlpsReaderHelper.getInstance(activity);
                break;
            case CHAINWAY:
                rfidDeviceInterface = ChainWayReaderHelper.getInstance(activity);
                break;
            default:
                rfidDeviceInterface = null;
                break;
        }
        return rfidDeviceInterface;
    }

    boolean connect();

    boolean disconnect();

    boolean startInventory();

    boolean stopInventory();

    boolean setPower(int power);

    //
    Integer getPower();

    boolean setSession(int session);

    Integer getSession();

    boolean isConnected();

    void changeInventoryMode(int mode, String tagPattern);


}
